package com.blink.zkclient.operate;

import com.blink.base.TestZK;
import com.blink.zkclient.ZkClientCreator;
import org.I0Itec.zkclient.ZkClient;
import org.junit.jupiter.api.Test;

/**
 * <Description> 使用ZkClient删除节点</Description>
 * <ClassName> DeleteNodeSample</ClassName>
 *
 * @Author liuxianzhao
 * @Date 2018年01月13日 13:18
 */
public class DeleteNodeSample extends TestZK {
    @Test
    public void testDeleteNode() {
        ZkClient zkClient = ZkClientCreator.getZkClient();
        String path = "/zk-book";
        zkClient.createPersistent(path, "");
        zkClient.createPersistent(path + "/c1", "");
        zkClient.deleteRecursive(path);
        sleep();
    }
}
